import { CSSProperties } from 'vue';

export interface ButtonProps<T = any> {
  label: string;
  icon?: string;
  tooltip?: string; // 鼠标放上提示
  type?: 'primary' | 'success' | 'warning' | 'danger' | 'info';
  permissionCode?: string;
  loading?: boolean;
  display?: boolean | ((params: any) => boolean);
  hide?: boolean | ((params: any) => boolean);
  attrs?: buttonAttrs;
  trigger?: 'click' | 'hover';
  children?: ButtonProps<T>[];
  methods?: (params: T, index: number) => void;
}

export interface buttonAttrs {
  disabled?: boolean;
  plain?: boolean;
  link?: boolean;
  style?: CSSProperties;
}
